/* ========================================
   TMS 物流管理系统 - 统一样式文件
   Transportation Management System
   ======================================== */

/* ========================================
   云途物流设计系统变量
   ======================================== */
:root {
    --zt-primary-green: #0d8484;
    --zt-primary-yellow: #faad39;
    --zt-primary-deep-green: #00574b;
    --zt-primary-deep-gray: #333;
    --zt-text-deep-gray: #333;
    --zt-text-mid-gray: #666;
    --zt-text-shallow-gray: #bdbdbd;
    --zt-text-white: #fff;
    --zt-text-red: #ff4d4f;
    --zt-text-orange: #f66b1d;
    --zt-line-shallow-gray: #ccc;
    --zt-line-shallow-gray1: #f0f0f0;
    --zt-bg-shallow-gray: #eff3f4;
    --zt-bg-mid-green: #cfe6e6;
    --zt-bg-shallow-green: #f1f8f8;
    --zt-bg-white: #fff;
    --zt-gra-green: linear-gradient(90.91deg, #00a891 -3.22%, #0d8484 101.99%);
}

/* ========================================
   通用布局样式
   ======================================== */
.tms-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    background: var(--zt-bg-white);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tms-section {
    background: var(--zt-bg-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 24px;
    overflow: hidden;
}

.tms-section-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--zt-line-shallow-gray1);
    background: var(--zt-bg-shallow-gray);
}

.tms-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--zt-text-deep-gray);
    margin: 0;
}

/* ========================================
   按钮样式
   ======================================== */
.tms-btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tms-btn-primary {
    background: var(--zt-primary-green);
    color: var(--zt-text-white);
}

.tms-btn-primary:hover {
    background: var(--zt-primary-deep-green);
}

.tms-btn-secondary {
    background: transparent;
    color: var(--zt-text-mid-gray);
    border: 1px solid var(--zt-line-shallow-gray);
}

.tms-btn-secondary:hover {
    border-color: var(--zt-primary-green);
    color: var(--zt-primary-green);
}

.tms-btn-orange {
    background: var(--zt-text-orange);
    color: var(--zt-text-white);
}

.tms-btn-orange:hover {
    background: #e55a1a;
}

/* ========================================
   表单样式
   ======================================== */
.tms-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tms-form-label {
    font-size: 12px;
    color: var(--zt-text-deep-gray);
    font-weight: 500;
}

.tms-form-input {
    padding: 8px 12px;
    border: 1px solid var(--zt-line-shallow-gray);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.tms-form-input:focus {
    outline: none;
    border-color: var(--zt-primary-green);
    box-shadow: 0 0 0 2px rgba(13, 132, 132, 0.1);
}

.tms-form-select {
    padding: 8px 12px;
    border: 1px solid var(--zt-line-shallow-gray);
    border-radius: 4px;
    font-size: 14px;
    background: var(--zt-bg-white);
    cursor: pointer;
}

/* ========================================
   表格样式
   ======================================== */
.tms-table-container {
    overflow-x: auto;
    max-width: 100%;
}

.tms-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    font-size: 14px;
}

.tms-table th {
    background: var(--zt-bg-shallow-gray);
    padding: 16px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--zt-text-deep-gray);
    border-bottom: 1px solid var(--zt-line-shallow-gray1);
    white-space: nowrap;
}

.tms-table th i {
    color: var(--zt-text-shallow-gray);
    margin-left: 4px;
    font-size: 12px;
}

.tms-table td {
    padding: 16px 8px;
    border-bottom: 1px solid var(--zt-line-shallow-gray1);
    vertical-align: middle;
    white-space: nowrap;
}

.tms-table tbody tr:hover {
    background: var(--zt-bg-shallow-gray);
}

/* ========================================
   标签页样式
   ======================================== */
.tms-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--zt-line-shallow-gray1);
    border-radius: 8px;
    overflow: hidden;
    background: var(--zt-bg-white);
}

.tms-tab-item {
    flex: 1;
    padding: 16px 20px;
    background: var(--zt-bg-white);
    color: var(--zt-text-mid-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-right: 1px solid var(--zt-line-shallow-gray1);
    min-height: 60px;
}

.tms-tab-item:last-child {
    border-right: none;
}

.tms-tab-item.active {
    background: var(--zt-primary-green);
    color: var(--zt-text-white);
}

.tms-tab-label {
    font-size: 14px;
    font-weight: 500;
}

.tms-tab-count {
    font-size: 12px;
    opacity: 0.8;
}

/* ========================================
   状态徽章样式
   ======================================== */
.tms-status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    width: fit-content;
}

.tms-status-badge.shipped {
    background-color: var(--zt-bg-shallow-green);
    color: var(--zt-primary-green);
}

.tms-status-badge.scheduled {
    background-color: var(--zt-bg-shallow-gray);
    color: var(--zt-primary-yellow);
}

.tms-status-badge.received {
    background-color: var(--zt-bg-shallow-gray);
    color: var(--zt-primary-deep-green);
}

.tms-status-badge.draft {
    background-color: var(--zt-bg-shallow-gray);
    color: var(--zt-text-mid-gray);
}

.tms-status-badge.transit {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

/* ========================================
   分页样式
   ======================================== */
.tms-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
}

.tms-pagination-info {
    color: var(--zt-text-mid-gray);
    font-size: 14px;
}

.tms-pagination-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tms-page-size-select {
    padding: 6px 12px;
    border: 1px solid var(--zt-line-shallow-gray);
    border-radius: 4px;
    background: var(--zt-bg-white);
}

.tms-pagination-buttons {
    display: flex;
    gap: 4px;
}

.tms-page-btn {
    padding: 6px 12px;
    border: 1px solid var(--zt-line-shallow-gray);
    background: var(--zt-bg-white);
    color: var(--zt-text-deep-gray);
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.tms-page-btn.active {
    background: var(--zt-primary-green);
    color: var(--zt-text-white);
    border-color: var(--zt-primary-green);
}

.tms-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1200px) {
    .tms-container {
        padding: 16px;
    }
    
    .tms-tabs {
        flex-wrap: wrap;
    }
    
    .tms-tab-item {
        min-width: 120px;
    }
    
    .search-row {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .tms-container {
        padding: 12px;
    }
    
    .tms-section {
        margin-bottom: 16px;
    }
    
    .tms-section-header {
        padding: 16px;
    }
    
    .tms-pagination {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .order-search-filter {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .search-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .search-group .tms-form-input,
    .search-group .tms-form-select,
    .search-group .tms-btn {
        min-height: 44px;
    }
    
    .order-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .order-actions .tms-btn {
        width: 100%;
        justify-content: center;
    }
    
    .tracking-header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        align-items: stretch;
    }
    
    .tracking-inputs {
        align-items: stretch;
    }
    
    .input-group {
        max-width: none;
    }
    
    .order-detail-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .info-section {
        padding: 16px;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .info-label {
        min-width: auto;
    }
    
    .info-value {
        text-align: left;
        margin-left: 0;
    }
}

/* ========================================
   特定页面样式
   ======================================== */

/* 订单中心特定样式 */
.order-search-filter {
    background: var(--zt-bg-white);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-group .tms-form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--zt-text-deep-gray);
    margin-bottom: 4px;
}

.search-group .tms-form-input,
.search-group .tms-form-select {
    width: 100%;
    min-height: 40px;
}

.search-group .tms-btn {
    min-height: 40px;
    justify-content: center;
}

.order-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--zt-bg-white);
    border: 1px solid var(--zt-line-shallow-gray);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 150px;
    z-index: 1000;
    display: none;
    margin-top: 4px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--zt-text-deep-gray);
    text-decoration: none;
    border-bottom: 1px solid var(--zt-line-shallow-gray1);
    transition: background-color 0.3s ease;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--zt-bg-shallow-gray);
    color: var(--zt-primary-green);
}

/* 按钮尺寸变体 */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
    min-height: 48px;
}

/* 物流跟踪特定样式 */
.tracking-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--zt-bg-shallow-gray);
    border-radius: 8px;
}

.tracking-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    align-items: center;
}

.input-group {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.input-group .tms-form-input {
    width: 100%;
    padding-right: 80px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.input-label {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--zt-text-mid-gray);
    background: var(--zt-bg-white);
    padding: 0 4px;
    border-radius: 2px;
    pointer-events: none;
}

/* 异常订单特定样式 */
.exception-order-container {
    background: var(--zt-bg-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.exception-orders-list {
    padding: 0;
}

.exception-order-item {
    background: var(--zt-bg-white);
    border: 1px solid var(--zt-line-shallow-gray1);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.exception-order-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.exception-order-item:last-child {
    margin-bottom: 0;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--zt-bg-shallow-gray);
    border-bottom: 1px solid var(--zt-line-shallow-gray1);
}

.order-priority {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.order-priority.high {
    background: #fff2e8;
    color: #d4380d;
    border: 1px solid #ffbb96;
}

.order-priority.medium {
    background: #fff7e6;
    color: #d46b08;
    border: 1px solid #ffd591;
}

.order-priority.low {
    background: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
}

.order-content {
    padding: 20px;
}

.order-main-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 20px;
}

.waybill-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.country-flag {
    font-size: 16px;
}

.order-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recipient-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recipient-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--zt-text-deep-gray);
}

.recipient-address {
    font-size: 14px;
    color: var(--zt-text-mid-gray);
    line-height: 1.4;
}

.problem-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--zt-text-orange);
}

.problem-info i {
    font-size: 16px;
}

.problem-text {
    font-size: 14px;
    font-weight: 500;
}

.order-actions-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.order-timer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--zt-text-mid-gray);
}

.remaining-time {
    color: var(--zt-text-orange);
    font-weight: 500;
}

.created-time {
    color: var(--zt-text-shallow-gray);
}

/* 订单详情特定样式 */
.order-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.info-section {
    background: var(--zt-bg-white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--zt-line-shallow-gray1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    color: var(--zt-text-mid-gray);
    font-weight: 500;
    min-width: 120px;
}

.info-value {
    font-size: 14px;
    color: var(--zt-text-deep-gray);
    font-weight: 500;
    text-align: right;
    flex: 1;
    margin-left: 16px;
}

/* 面包屑导航 */
.breadcrumb-section {
    background: var(--zt-bg-white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--zt-line-shallow-gray1);
    margin-bottom: 24px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item {
    color: var(--zt-text-mid-gray);
    text-decoration: none;
    font-size: 14px;
}

.breadcrumb-item:hover {
    color: var(--zt-primary-green);
}

.breadcrumb-item.active {
    color: var(--zt-text-deep-gray);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--zt-text-shallow-gray);
}

/* ========================================
   my_erpnext_page.html 特定样式
   ======================================== */

/* 余额管理区域 */
.balance-section {
    background: var(--zt-bg-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 24px;
    overflow: hidden;
}

.balance-header {
    padding: 20px 24px;
    background: var(--zt-gra-green);
    color: var(--zt-text-white);
}

.balance-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-title h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.currency-dropdown {
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.currency-dropdown:hover {
    background: rgba(255,255,255,0.1);
}

.balance-content {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.balance-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.balance-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-label {
    font-size: 16px;
    color: var(--zt-text-mid-gray);
    font-weight: 500;
}

.balance-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--zt-primary-green);
}

.balance-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--zt-text-orange);
    font-size: 14px;
}

.alert-text {
    font-weight: 500;
}

.balance-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pending-order, .available-order {
    padding: 16px;
    background: var(--zt-bg-shallow-gray);
    border-radius: 8px;
}

.pending-label, .available-label {
    font-size: 14px;
    color: var(--zt-text-mid-gray);
    margin-bottom: 8px;
    font-weight: 500;
}

.pending-amount {
    font-size: 20px;
    font-weight: 600;
    color: var(--zt-text-orange);
}

.available-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-text {
    font-size: 14px;
    color: var(--zt-text-mid-gray);
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.left-column, .right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 异常订单区域 */
.exception-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.exception-count {
    background: var(--zt-text-orange);
    color: var(--zt-text-white);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.exception-message {
    color: var(--zt-text-mid-gray);
    font-size: 14px;
    margin-bottom: 16px;
}

.exception-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.exception-actions i {
    color: var(--zt-text-mid-gray);
    cursor: pointer;
    transition: color 0.3s ease;
}

.exception-actions i:hover {
    color: var(--zt-primary-green);
}

.more-link {
    color: var(--zt-primary-green);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.more-link:hover {
    text-decoration: underline;
}

/* 待处理订单网格 */
.pending-orders-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 24px 24px;
}

.pending-order-card {
    background: var(--zt-bg-white);
    border: 1px solid var(--zt-line-shallow-gray1);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.pending-order-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.pending-order-card .order-header {
    padding: 12px 16px;
    background: var(--zt-bg-shallow-gray);
    border-bottom: 1px solid var(--zt-line-shallow-gray1);
}

.pending-order-card .order-content {
    padding: 16px;
}

.pending-order-card .order-info {
    margin-bottom: 12px;
}

.pending-order-card .order-id {
    font-size: 14px;
    font-weight: 600;
    color: var(--zt-text-deep-gray);
    margin-bottom: 8px;
}

.pending-order-card .order-reason {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--zt-text-orange);
    font-size: 13px;
}

.pending-order-card .order-timer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pending-order-card .remaining-time {
    font-size: 12px;
    color: var(--zt-text-orange);
    font-weight: 500;
}

.operate-btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* 仪表板区域 */
.dashboard-content {
    padding: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--zt-bg-white);
    border: 1px solid var(--zt-line-shallow-gray1);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 24px;
    color: var(--zt-primary-green);
    margin-bottom: 12px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--zt-text-deep-gray);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--zt-text-mid-gray);
}

/* 预定取件列表 */
.scheduled-pickups h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: var(--zt-text-deep-gray);
    font-weight: 600;
}

.scheduled-list {
    margin-bottom: 16px;
}

.scheduled-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--zt-line-shallow-gray1);
}

.scheduled-item:last-child {
    border-bottom: none;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-info .order-id {
    font-size: 14px;
    font-weight: 600;
    color: var(--zt-text-deep-gray);
}

.item-info .pickup-time {
    font-size: 12px;
    color: var(--zt-text-mid-gray);
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pickup-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--zt-primary-green);
}

.pickup-status {
    font-size: 12px;
    color: var(--zt-primary-green);
    font-weight: 500;
}

.pickup-actions {
    display: flex;
    gap: 12px;
}

/* 客服区域 */
.customer-service-content {
    padding: 24px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--zt-line-shallow-gray1);
}

.service-item:last-child {
    border-bottom: none;
}

.service-icon {
    width: 40px;
    height: 40px;
    background: var(--zt-bg-shallow-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zt-primary-green);
    font-size: 18px;
}

.service-info {
    flex: 1;
}

.service-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--zt-text-deep-gray);
    margin-bottom: 4px;
}

.service-desc {
    font-size: 14px;
    color: var(--zt-text-mid-gray);
}

/* 运费计算器 */
.shipping-calculator-content {
    padding: 24px;
}

.shipping-calculator-content .tms-form-group {
    margin-bottom: 16px;
}

.calculation-result {
    margin-top: 20px;
    padding: 16px;
    background: var(--zt-bg-shallow-gray);
    border-radius: 8px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-label {
    font-size: 14px;
    color: var(--zt-text-mid-gray);
    font-weight: 500;
}

.result-value {
    font-size: 16px;
    color: var(--zt-primary-green);
    font-weight: 600;
}

/* AI聊天机器人 */
.ai-chat-content {
    padding: 24px;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--zt-bg-shallow-gray);
    border-radius: 8px;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.message:last-child {
    margin-bottom: 0;
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: var(--zt-primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zt-text-white);
    font-size: 14px;
}

.user-message .message-avatar {
    background: var(--zt-text-mid-gray);
}

.message-content {
    flex: 1;
    padding: 12px 16px;
    background: var(--zt-bg-white);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--zt-text-deep-gray);
}

.chat-input-area {
    display: flex;
    gap: 12px;
}

.chat-input-area .tms-form-input {
    flex: 1;
}

.chat-input-area .tms-btn {
    padding: 8px 16px;
}

/* 响应式设计补充 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .balance-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .balance-content {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-content,
    .customer-service-content,
    .shipping-calculator-content,
    .ai-chat-content {
        padding: 16px;
    }
    
    .pending-orders-grid {
        padding: 0 16px 16px;
    }
    
    .chat-messages {
        height: 250px;
    }
}

/* ========================================
   补充样式和修复
   ======================================== */

/* Font Awesome 图标样式 */
.fas {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.fa-chevron-down::before {
    content: "\f078";
}

.fa-eye::before {
    content: "\f06e";
}

.fa-square::before {
    content: "\f0c8";
}

.fa-file-alt::before {
    content: "\f15c";
}

.fa-exclamation-triangle::before {
    content: "\f071";
}

.fa-shipping-fast::before {
    content: "\f48b";
}

.fa-check-circle::before {
    content: "\f058";
}

.fa-clock::before {
    content: "\f017";
}

.fa-headset::before {
    content: "\f590";
}

.fa-comments::before {
    content: "\f086";
}

.fa-phone::before {
    content: "\f095";
}

.fa-robot::before {
    content: "\f544";
}

.fa-user::before {
    content: "\f007";
}

.fa-paper-plane::before {
    content: "\f1d8";
}

.fa-cog::before {
    content: "\f013";
}

.fa-unlock::before {
    content: "\f09c";
}

.fa-undo::before {
    content: "\f0e2";
}

.fa-info-circle::before {
    content: "\f05a";
}

.fa-exchange-alt::before {
    content: "\f362";
}

.fa-filter::before {
    content: "\f0b0";
}

.fa-search::before {
    content: "\f002";
}

/* 修复一些可能的样式冲突 */
.tms-container * {
    box-sizing: border-box;
}

/* 确保按钮在表单组中正确显示 */
.tms-form-group .tms-btn {
    margin-top: 8px;
}

/* 修复状态徽章在卡片中的显示 */
.pending-order-card .tms-status-badge {
    margin: 0;
}

/* 确保图标在按钮中正确对齐 */
.tms-btn i {
    line-height: 1;
}

/* 修复表格中的图标显示 */
.tms-table th i,
.tms-table td i {
    vertical-align: middle;
}

/* 确保下拉菜单正确显示 */
.dropdown-menu {
    z-index: 9999;
}

/* 修复响应式设计中的一些细节 */
@media (max-width: 480px) {
    .tms-container {
        padding: 12px;
    }
    
    .balance-content {
        padding: 16px;
    }
    
    .stats-grid {
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .pending-orders-grid {
        padding: 0 12px 12px;
    }
    
    .dashboard-content,
    .customer-service-content,
    .shipping-calculator-content,
    .ai-chat-content {
        padding: 16px;
    }
}

/* 修复一些浏览器兼容性问题 */
.tms-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.tms-form-input,
.tms-form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 确保渐变背景在所有浏览器中正确显示 */
.balance-header {
    background: -webkit-linear-gradient(90.91deg, #00a891 -3.22%, #0d8484 101.99%);
    background: -moz-linear-gradient(90.91deg, #00a891 -3.22%, #0d8484 101.99%);
    background: -o-linear-gradient(90.91deg, #00a891 -3.22%, #0d8484 101.99%);
    background: linear-gradient(90.91deg, #00a891 -3.22%, #0d8484 101.99%);
}

/* 修复一些可能的字体问题 */
.tms-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 确保所有交互元素有正确的光标 */
.tms-btn,
.currency-dropdown,
.exception-actions i,
.more-link,
.pickup-checkbox {
    cursor: pointer;
}

/* 修复一些可能的间距问题 */
.tms-section + .tms-section {
    margin-top: 24px;
}

/* 确保状态徽章在所有情况下都正确显示 */
.tms-status-badge {
    display: inline-block;
    white-space: nowrap;
    vertical-align: middle;
}

/* 修复一些可能的颜色问题 */
.tms-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 确保表单元素在所有浏览器中一致 */
.tms-form-input:focus,
.tms-form-select:focus {
    outline: none;
    border-color: var(--zt-primary-green);
    box-shadow: 0 0 0 2px rgba(13, 132, 132, 0.1);
}

/* 修复一些可能的动画问题 */
@media (prefers-reduced-motion: reduce) {
    .tms-btn,
    .stat-card,
    .pending-order-card {
        transition: none;
    }
    
    .stat-card:hover {
        transform: none;
    }
    
    .pending-order-card:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
}

/* ========================================
   最终修复和优化
   ======================================== */

/* 确保所有元素都有正确的盒模型 */
* {
    box-sizing: border-box;
}

/* 修复可能的字体渲染问题 */
.tms-container {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 确保所有按钮都有正确的触摸目标大小 */
.tms-btn {
    min-height: 44px;
    min-width: 44px;
}

/* 修复可能的滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--zt-bg-shallow-gray);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--zt-line-shallow-gray);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--zt-text-mid-gray);
}

/* 确保所有输入框都有正确的触摸目标大小 */
.tms-form-input,
.tms-form-select {
    min-height: 44px;
}

/* 修复可能的焦点样式问题 */
.tms-btn:focus,
.tms-form-input:focus,
.tms-form-select:focus {
    outline: 2px solid var(--zt-primary-green);
    outline-offset: 2px;
}

/* 确保所有链接都有正确的样式 */
a {
    color: var(--zt-primary-green);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 修复可能的打印样式 */
@media print {
    .tms-container {
        box-shadow: none;
        background: white;
    }
    
    .tms-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .tms-btn {
        border: 1px solid #ccc;
        background: white;
        color: black;
    }
}

/* 确保所有状态徽章都有正确的显示 */
.tms-status-badge.scheduled {
    background-color: var(--zt-bg-shallow-gray);
    color: var(--zt-text-orange);
    border: 1px solid var(--zt-text-orange);
}

/* 修复可能的表格样式问题 */
.tms-table {
    border: 1px solid var(--zt-line-shallow-gray1);
}

.tms-table th:first-child,
.tms-table td:first-child {
    border-left: none;
}

.tms-table th:last-child,
.tms-table td:last-child {
    border-right: none;
}

/* 确保所有图标都有正确的显示 */
.tms-btn i,
.service-icon i,
.stat-icon i {
    display: inline-block;
    vertical-align: middle;
}

/* 修复可能的响应式问题 */
@media (max-width: 600px) {
    .balance-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .pending-orders-grid {
        padding: 0 12px 12px;
    }
    
    .tms-section-header {
        padding: 16px;
    }
    
    .dashboard-content,
    .customer-service-content,
    .shipping-calculator-content,
    .ai-chat-content {
        padding: 16px;
    }
}

/* 确保所有动画都有正确的性能优化 */
.tms-btn,
.stat-card,
.pending-order-card {
    will-change: transform, box-shadow;
}

/* 修复可能的暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .tms-container {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .tms-section {
        background: #2d2d2d;
        border: 1px solid #404040;
    }
    
    .tms-section-header {
        background: #404040;
        border-bottom-color: #505050;
    }
    
    .tms-form-input,
    .tms-form-select {
        background: #2d2d2d;
        border-color: #505050;
        color: #ffffff;
    }
    
    .tms-btn-secondary {
        background: transparent;
        border-color: #505050;
        color: #ffffff;
    }
}

/* 确保所有元素都有正确的无障碍支持 */
.tms-btn:focus-visible,
.tms-form-input:focus-visible,
.tms-form-select:focus-visible {
    outline: 3px solid var(--zt-primary-green);
    outline-offset: 2px;
}

/* 修复可能的RTL语言支持 */
[dir="rtl"] .tms-container {
    text-align: right;
}

[dir="rtl"] .balance-row,
[dir="rtl"] .result-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .item-actions {
    flex-direction: row-reverse;
}

/* 确保所有加载状态都有正确的显示 */
.tms-btn.loading {
    position: relative;
    color: transparent;
}

.tms-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   异常订单页面特定样式
   ======================================== */

/* 异常订单状态标签样式 */
.exception-order-item .order-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.exception-order-item .tms-status-badge.scheduled {
    background-color: #fff2e8;
    color: #d4380d;
    border: 1px solid #ffbb96;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

/* 优先级样式 */
.order-priority {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    display: inline-block;
}

.order-priority.high {
    background: #fff2e8;
    color: #d4380d;
    border: 1px solid #ffbb96;
}

.order-priority.medium {
    background: #fff7e6;
    color: #d46b08;
    border: 1px solid #ffd591;
}

.order-priority.low {
    background: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
}

/* 运单链接样式 */
.waybill-link {
    text-decoration: none;
    color: var(--zt-primary-green);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s ease;
}

.waybill-link:hover {
    color: var(--zt-primary-deep-green);
    text-decoration: underline;
}

.waybill-number {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* 收件人信息样式 */
.recipient-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--zt-text-deep-gray);
    margin-bottom: 4px;
    display: block;
}

.recipient-address {
    font-size: 14px;
    color: var(--zt-text-mid-gray);
    line-height: 1.4;
    display: block;
}

/* 问题信息样式 */
.problem-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--zt-text-orange);
    margin-top: 8px;
}

.problem-info i {
    font-size: 16px;
    color: var(--zt-text-orange);
}

.problem-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--zt-text-orange);
}

/* 内联操作按钮样式 */
.order-actions-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.order-actions-inline .tms-btn {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
    min-width: 60px;
}

.order-actions-inline .tms-btn i {
    font-size: 12px;
}

/* 订单计时器样式 */
.order-timer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--zt-text-mid-gray);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--zt-line-shallow-gray1);
}

.remaining-time {
    color: var(--zt-text-orange);
    font-weight: 500;
}

.created-time {
    color: var(--zt-text-shallow-gray);
}

/* 异常订单列表样式优化 */
.exception-orders-list {
    padding: 0;
}

.exception-order-item {
    background: var(--zt-bg-white);
    border: 1px solid var(--zt-line-shallow-gray1);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.exception-order-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.exception-order-item:last-child {
    margin-bottom: 0;
}

.exception-order-item .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--zt-bg-shallow-gray);
    border-bottom: 1px solid var(--zt-line-shallow-gray1);
}

.exception-order-item .order-content {
    padding: 20px;
}

.exception-order-item .order-main-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 20px;
}

.exception-order-item .waybill-section {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
}

.exception-order-item .country-flag {
    font-size: 16px;
    margin-left: 8px;
}

.exception-order-item .order-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exception-order-item .recipient-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .exception-order-item .order-main-info {
        flex-direction: column;
        gap: 16px;
    }
    
    .exception-order-item .waybill-section {
        min-width: auto;
    }
    
    .order-actions-inline {
        flex-direction: column;
    }
    
    .order-actions-inline .tms-btn {
        width: 100%;
        justify-content: center;
    }
    
    .order-timer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .exception-order-item .order-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .exception-order-item .order-content {
        padding: 16px;
    }
    
    .order-actions-inline {
        gap: 8px;
    }
    
    .order-actions-inline .tms-btn {
        min-width: 80px;
    }
}

/* 异常订单页面标签页样式优化 */
.exception-order-container .tms-tabs {
    margin-bottom: 24px;
}

.exception-order-container .tms-tab-item {
    min-height: 50px;
    padding: 12px 16px;
}

.exception-order-container .tms-tab-item.active {
    background: var(--zt-primary-green);
    color: var(--zt-text-white);
}

/* 搜索筛选区域样式优化 */
.exception-order-container .order-search-filter {
    margin-bottom: 24px;
}

.exception-order-container .search-row {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}

.exception-order-container .search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.exception-order-container .search-group .tms-form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--zt-text-deep-gray);
    margin-bottom: 4px;
}

.exception-order-container .search-group .tms-form-input,
.exception-order-container .search-group .tms-form-select {
    width: 100%;
    min-height: 40px;
}

.exception-order-container .search-group .tms-btn {
    min-height: 40px;
    justify-content: center;
}

/* 全局操作按钮样式优化 */
.exception-order-container .order-actions {
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.exception-order-container .order-actions .tms-btn {
    min-height: 40px;
    padding: 8px 16px;
}

/* 下拉菜单样式优化 */
.exception-order-container .dropdown {
    position: relative;
    display: inline-block;
}

.exception-order-container .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.exception-order-container .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--zt-bg-white);
    border: 1px solid var(--zt-line-shallow-gray);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 150px;
    z-index: 1000;
    display: none;
    margin-top: 4px;
}

.exception-order-container .dropdown-menu.show {
    display: block;
}

.exception-order-container .dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--zt-text-deep-gray);
    text-decoration: none;
    border-bottom: 1px solid var(--zt-line-shallow-gray1);
    transition: background-color 0.3s ease;
}

.exception-order-container .dropdown-item:last-child {
    border-bottom: none;
}

.exception-order-container .dropdown-item:hover {
    background-color: var(--zt-bg-shallow-gray);
    color: var(--zt-primary-green);
}

/* ========================================
   异常订单查询区域样式修复
   ======================================== */

/* 异常订单页面查询区域专用样式 */
.tms-container .order-search-filter {
    background: var(--zt-bg-white);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 24px;
    border: 1px solid var(--zt-line-shallow-gray1);
}

.tms-container .order-search-filter .search-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: end;
}

.tms-container .order-search-filter .search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tms-container .order-search-filter .search-group .tms-form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--zt-text-deep-gray);
    margin-bottom: 4px;
    line-height: 1.2;
}

.tms-container .order-search-filter .search-group .tms-form-input,
.tms-container .order-search-filter .search-group .tms-form-select {
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid var(--zt-line-shallow-gray);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tms-container .order-search-filter .search-group .tms-form-input:focus,
.tms-container .order-search-filter .search-group .tms-form-select:focus {
    outline: none;
    border-color: var(--zt-primary-green);
    box-shadow: 0 0 0 2px rgba(13, 132, 132, 0.1);
}

.tms-container .order-search-filter .search-group .tms-btn {
    min-height: 40px;
    padding: 10px 16px;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tms-container .order-search-filter .search-group .tms-btn-secondary {
    background: var(--zt-bg-white);
    color: var(--zt-text-mid-gray);
    border: 1px solid var(--zt-line-shallow-gray);
}

.tms-container .order-search-filter .search-group .tms-btn-secondary:hover {
    border-color: var(--zt-primary-green);
    color: var(--zt-primary-green);
    background: var(--zt-bg-shallow-gray);
}

.tms-container .order-search-filter .search-group .tms-btn-primary {
    background: var(--zt-primary-green);
    color: var(--zt-text-white);
    border: 1px solid var(--zt-primary-green);
}

.tms-container .order-search-filter .search-group .tms-btn-primary:hover {
    background: var(--zt-primary-deep-green);
    border-color: var(--zt-primary-deep-green);
}

/* 响应式查询区域 */
@media (max-width: 1200px) {
    .tms-container .order-search-filter .search-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .tms-container .order-search-filter {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .tms-container .order-search-filter .search-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tms-container .order-search-filter .search-group .tms-form-input,
    .tms-container .order-search-filter .search-group .tms-form-select,
    .tms-container .order-search-filter .search-group .tms-btn {
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .tms-container .order-search-filter {
        padding: 12px;
    }
    
    .tms-container .order-search-filter .search-row {
        gap: 12px;
    }
    
    .tms-container .order-search-filter .search-group .tms-form-label {
        font-size: 13px;
    }
    
    .tms-container .order-search-filter .search-group .tms-form-input,
    .tms-container .order-search-filter .search-group .tms-form-select {
        font-size: 13px;
        padding: 8px 10px;
    }
    
    .tms-container .order-search-filter .search-group .tms-btn {
        font-size: 13px;
        padding: 8px 12px;
    }
}
